#### FIGURE S4 IN THE SI:
rm(list=ls())

library(PanelMatch)
library(ggplot2)
library(haven)

setwd("~/Dropbox/Side projects/BET HOUSES PROJECT/data/Gambling_Replication_Materials/Data")
setwd("/Users/sergimartinez/Dropbox/EUI/BET HOUSES PROJECT/data/estimates_050121/")

allmap <- read_dta("panelmatch.dta")

data <- data.frame(allmap)

data$time2 <- as.integer(data$time)
figureS4 <- DisplayTreatment(unit.id = "school_id",
                      time.id = "time2", legend.position = "none",
                      xlab = "", ylab = "Schools",
                      treatment = "treat", data = data)
theme_results <-theme(text=element_text(family="Times",
                                        size = 17),
                      axis.text.x = element_text(size = 17, color = "black", angle=0),
                      axis.text.y = element_blank(),
                      axis.title.y = element_text(size = 17, color = "black"),
                      axis.title.x = element_text(size = 17, color = "black"),
                      legend.position = "none",
                      panel.grid.major.y = element_blank(),
                      panel.grid.minor.y = element_blank(),
                      axis.ticks = element_blank()
)

figureS4 + theme_results



#ggsave("treat_evo.png", width = 30, height = 25, units = "cm")
#############################

